<template>
  <el-tabs v-model="activeName" class="cadre-tab-box">
    <el-tab-pane label="领导小组" name="1">
      <leader-tem v-if="activeName === '1'"></leader-tem>
    </el-tab-pane>
    <el-tab-pane label="干部管理" name="2">
      <cadres-tem v-if="activeName === '2'"></cadres-tem>
    </el-tab-pane>
  </el-tabs>
</template>
<script>
import leaderTem from './components/leader.vue';
import cadresTem from './components/cadres.vue';
export default {
  name: 'cadre',
  components: { leaderTem, cadresTem },
  data() {
    return {
      activeName: '2'
    }
  },
  created() {
    this.activeName = this.$route.params.activeName || '1'

    let loginForm = {
      username: "admin",
      password: "admin123",
      rememberMe: false,
    }
    this.$store.dispatch("Login", loginForm).then(() => {
      // this.$router.push({ path: this.redirect || "/" }).catch(() => { });
    }).catch(() => { })
  },
  methods: {}
}
</script>
<style lang="scss" scoped>
.cadre-tab-box{
  padding: 20px;
}
</style>